#pragma once

#define MAX_PLUGINS 5
#include <memory>
#include <iostream>
using namespace std;

typedef void (*IPlugin)(PBYTE pbIn, DWORD dwSize);

class PluginManager//PluginManager
{
public:
	
	~PluginManager(void);

	void loadPlugins();
	void unloadPlugins();
	void process(PBYTE pIn, DWORD dwSize);
	static PluginManager* getInstance();

private:
	wchar_t m_szPath[MAX_PATH];
	wchar_t m_szCfg[MAX_PATH];
	
	friend class auto_ptr<PluginManager>;
	static auto_ptr<PluginManager> m_pInstance;
	static bool isLoaded;

	DWORD	m_dwPlugins;
	HMODULE	hPlugin[MAX_PLUGINS];
	IPlugin	iPluginsEntry[MAX_PLUGINS];

	inline static void doNull(PBYTE pbIn, DWORD dwSize)
	{
		//OutputDebugStringW(L"doNull invoked..");
	}

	PluginManager(void);
};

